package com.vortex.cloud.zhsw.xinyang.util;

/**
 * @author mumuwen
 * @date 2020-11-20 5:58 下午
 */
public class MyLatLng {

    public static double Rc = 6378137;
    public static double Rj = 6356725;
    public double mLoDeg, mLoMin, mLoSec;
    public double mLaDeg, mLaMin, mLaSec;
    public double mLongitude, mLatitude;
    public double mRadLo, mRadLa;
    public double ec;
    public double ed;

    public MyLatLng(double longitude, double latitude) {
        mLoDeg = (int) longitude;
        mLoMin = (int) ((longitude - mLoDeg) * 60);
        mLoSec = (longitude - mLoDeg - mLoMin / 60) * 3600;

        mLaDeg = (int) latitude;
        mLaMin = (int) ((latitude - mLaDeg) * 60);
        mLaSec = (latitude - mLaDeg - mLaMin / 60) * 3600;

        mLongitude = longitude;
        mLatitude = latitude;
        mRadLo = longitude * Math.PI / 180;
        mRadLa = latitude * Math.PI / 180;
        ec = Rj + (Rc - Rj) * (90 - mLatitude) / 90;
        ed = ec * Math.cos(mRadLa);

    }


}
